{{- /*
@param {string} (positional parameter 0) Author name.

@returns {template.HTML}

@examples

  {{< mention "username" >}}
*/ -}}

{{- if (.Get 0) -}}

    {{- $user := (.Get 0) -}}
    {{- $url := (($user) | urlize) -}}
    {{- $taxonomy := "authors" -}}
    {{- $page := (site.GetPage (printf "/%s/%s" ($taxonomy) ($url))) -}}
    {{- $name := ($page.Title | default (($user) | markdownify)) -}}

    {{- with ($page) -}}
      <span class="shortcode shortcode-{{ ($.Name) }}"><a href="{{ ($page.RelPermalink) }}">{{ ($name) }}</a></span>{{ else }}{{ ($name) }}
    {{- end -}}

{{- else -}}

    {{ (partial "alerts/no_params" .) }}

{{- end -}}
